package edu.must.uh.util;

public class PageHelper {
    
    public static String getLimit (PageBean pageBean) {
        
        String reString = "";  //LIMIT 5; //检索前 5 个记录行
        if(pageBean != null){  //LIMIT 5,10; // 检索记录行 6-15
            if(pageBean.getPage() == 1) {
                reString = " LIMIT " + pageBean.getLimit() ;
            }else {
                reString = " LIMIT " + ((pageBean.getPage() - 1) * pageBean.getLimit())  + "," + pageBean.getLimit();
            }            
        }       
        return reString;
    }
    
    
    

}
